<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center buddhistCalendar_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub buddhistCalendar_fd0_0'>
          <view class='flex flex-wrap align-center buddhistCalendar_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  buddhistCalendar_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='buddhistCalendar_fd0_0_c1_c0'>{{$t('佛历')}}2568</text>
          </view>
          <view class='flex flex-wrap align-center justify-end buddhistCalendar_fd0_0_c0'>
            <image class='buddhistCalendar_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"77.png"'
              @tap.stop="handleJumpDiy" data-type="navigateTo"
              :data-url="`/pages/shouye/schedulePage/schedulePage?state=1&&name=${riqi}`"></image>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout buddhistCalendar_flex_1">
        <view class='flex flex-wrap align-center justify-center'>
          <text class='buddhistCalendar_fd1_0_c0'>{{riqi}}</text>
        </view>
        <view class='flex flex-wrap align-center justify-center buddhistCalendar_fd1_1'>
          <text class='buddhistCalendar_fd1_1_c0'>{{cancelInfo.name}}</text>
        </view>
        <view class='flex flex-wrap align-center buddhistCalendar_fd1_2'>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout buddhistCalendar_flex_2">
        <!-- <benben-calendar-diy mode='date' year-arrow-color='#666666' month-arrow-color='#666666'
          active-bg-color='#912F22' range-bg-color='rgba(41,121,255,0.13)' :change-title='true' :change-year='true'
          :change-month='true' @change="change" class=" buddhistCalendar_fd2_0"></benben-calendar-diy> -->
        <!--  <gwbq-calendar class="cancel-box" :insert="true" :lunar="true" :start-date="'2019-3-2'" :end-date="'2019-5-20'"
          @change="change" /> -->
        <!-- <view class='flex flex-wrap align-center buddhistCalendar_fd2_1'>
        </view> -->
        <ren-calendar ref='ren' :markDays='markDays' :headerBar='true' @onDayClick='onDayClick'></ren-calendar>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout buddhistCalendar_flex_3">
        <view class='flex flex-wrap align-center buddhistCalendar_fd3_0'>
          <!-- <image class='buddhistCalendar_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"78.png"'></image> -->
          <view class='flex flex-wrap align-center justify-center homePage_fd5_0'>
            <text class='text-cut homePage_fd5_0_c0'>{{$t('修')}}</text>
          </view>
          <text class='buddhistCalendar_fd3_0_c1'>{{cancelInfo.yi}}</text>
        </view>
        <view class='flex flex-wrap align-center buddhistCalendar_fd3_0'>
          <!-- <image class='buddhistCalendar_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"79.png"'></image> -->
          <view class='flex flex-wrap align-center justify-center homePage_fd5_0'
            style="background-color: rgba(152, 112, 64, 1)">
            <text class='text-cut homePage_fd5_0_c0'>{{$t('课')}}</text>
          </view>
          <text class='buddhistCalendar_fd3_0_c1'>{{cancelInfo.ji}}</text>
        </view>
        <view class='flex flex-wrap align-center buddhistCalendar_fd3_0'>
          <!-- <image class='buddhistCalendar_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"79.png"'></image> -->
          <view class='flex flex-wrap align-center justify-center homePage_fd5_0'
            style="background-color: rgba(152, 112, 64, 1)">
            <text class='text-cut homePage_fd5_0_c0'>{{$t('节')}}</text>
          </view>
          <text class='buddhistCalendar_fd3_0_c1'>{{cancelInfo.listys }}</text>
        </view>
        <view class='flex flex-wrap align-center buddhistCalendar_fd3_0' @tap.stop="handleJumpDiy"
          v-if="cancelInfo.richeng" data-type="navigateTo"
          :data-url="`/pages/shouye/schedulePage/schedulePage?state=2&name=${riqi}`">
          <image class='buddhistCalendar_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"80.png"'></image>

          <text class='buddhistCalendar_fd3_0_c1'>{{cancelInfo.richeng}}</text>
        </view>
        <view class='flex flex-wrap align-center justify-between buddhistCalendar_fd3_3' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/wode/inviteFriends/inviteFriends`">
          <view class='flex flex-direction flex-wrap align-stretch flex-sub buddhistCalendar_fd3_3_c0'>
            <view class='flex flex-wrap align-center'>
              <image class='buddhistCalendar_fd3_3_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"101.png"'></image>
              <text class='buddhistCalendar_fd3_3_c0_c0_c1'>{{$t('快去邀请好友下载app')}}</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='buddhistCalendar_fd3_3_c0_c1_c0'>{{$t('感受佛教文化带来的心灵疗愈')}}</text>
            </view>
          </view>
          <view class='flex flex-wrap align-center buddhistCalendar_fd3_3_c1'>
            <image class='buddhistCalendar_fd3_3_c1_c0' mode="aspectFit" :src='cancelInfo.img'></image>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import benbenCalendarDiy from '@/components/benben-calendar-diy/benben-calendar-diy.vue'
  export default {
    components: {
      benbenCalendarDiy
    },

    data() {
      return {
        riqi: '',
        cancelInfo: {
          folineirong: '',
          day_list: [],
          ji: '',
          name: '',
          sum_day: '',
          time: '',
          yi: ''
        },
        markDays: []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.riqi = options.riqi
      this.getCAncel()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      onDayClick(data) {
        this.riqi = data.date;
        this.getCAncel()
      },
      getCAncel() {
        this.$api.post(global.apiUrls.post6596749dbeacb, {
          time: this.riqi
        }).then(res => {
          if (res.data.code == 1) {
            this.cancelInfo = res.data.data
            this.markDays = res.data.data.markDays
          }
        })
      },
      change(e) {
        console.log(e)
        this.riqi = e.time

        this.getCAncel()
      }
    }
  };
</script>
<style lang="scss" scoped>
  .homePage_fd5_0_c0 {
    color: #FFFFFF;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .homePage_fd5_0 {
    background: rgba(145, 47, 34, 1);
    background-size: 100% auto;
    min-width: 60rpx;
    min-height: 60rpx;
    border-radius: 40rpx;
    margin-right: 10rpx
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(247, 243, 237, 1);
    background-size: 100% auto;
  }

  .buddhistCalendar_flex_0 {
    border-bottom: 1px solid #eee;
    background: rgba(247, 243, 237, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .buddhistCalendar_fd0_0_c2_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .buddhistCalendar_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .buddhistCalendar_fd0_0_c0 {
    width: 120rpx;
  }

  .buddhistCalendar_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .buddhistCalendar_flex_1 {
    padding: 41rpx 32rpx 0rpx 32rpx;
  }

  .buddhistCalendar_fd1_2 {
    background: rgba(235, 228, 217, 1);
    border-radius: 10rpx;
    background-size: 100% auto;
    height: 20rpx;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd1_1_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .buddhistCalendar_fd1_1 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd1_0_c0 {
    color: #912F22;
    font-size: 40rpx;
    font-weight: 700;
    line-height: 40rpx;
  }

  .buddhistCalendar_flex_2 {
    padding: 40rpx 32rpx 0rpx 32rpx;
  }

  .buddhistCalendar_fd2_1 {
    background: rgba(235, 228, 217, 1);
    border-radius: 10rpx;
    background-size: 100% auto;
    height: 20rpx;
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd2_0 {
    width: 680rpx;
  }

  .buddhistCalendar_flex_3 {
    padding: 32rpx 40rpx 0rpx 40rpx;
  }

  .buddhistCalendar_fd3_3_c1_c0 {
    width: 208rpx;
    height: 208rpx;
    border-radius: 40rpx;
  }

  .buddhistCalendar_fd3_3_c1 {
    background: rgba(255, 255, 255, 1);
    padding: 13rpx;
    border-radius: 40rpx;
    background-size: 100% auto;
  }

  .buddhistCalendar_fd3_3_c0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 400;
    line-height: 48rpx;
  }

  .buddhistCalendar_fd3_3_c0_c0_c1 {
    color: #912F22;
    font-size: 40rpx;
    font-weight: 900;
    line-height: 42rpx;
    width: 240rpx;
  }

  .buddhistCalendar_fd3_3_c0_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 44rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd3_3_c0 {
    margin: 0rpx 17rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd3_3 {
    background: var(--benbenbgColor7);
    border-radius: 40rpx;
    background-size: 100% auto;
    padding: 16rpx 24rpx 16rpx 32rpx;
  }

  .buddhistCalendar_fd3_0_c1 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 500;
    line-height: 32rpx;
    width: 500rpx;
  }

  .buddhistCalendar_fd3_0_c0 {
    width: 64rpx;
    height: 64rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .buddhistCalendar_fd3_0 {
    margin: 0rpx 0rpx 32rpx 0rpx;
  }
</style>
